package com.example.testone.uiComponents;

import androidx.annotation.IntDef;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @Author: dreamgyf
 * @Data: 2021/6/15
 */
public interface WordsButtonAttrs {

    /**
     * 按钮类型：
     * 主要按钮
     * 朴素按钮
     * 次要按钮
     * 文字按钮
     */
    int STYLE_MAJOR = 0;
    int STYLE_SIMPLE = 1;
    int STYLE_MINOR = 2;
    int STYLE_TEXT = 3;

    /**
     * 按钮尺寸：
     * 大、中、小
     */
    int SIZE_LARGE = 0;
    int SIZE_MEDIUM = 1;
    int SIZE_SMALL = 2;

    /**
     * 按钮状态：
     * 普通、禁用、危险、加载
     */
    int STATUS_NORMAL = 0;
    int STATUS_DISABLE = 1;
    int STATUS_DANGER = 2;
    int STATUS_LOADING = 3;

    @IntDef({STYLE_MAJOR,
            STYLE_SIMPLE,
            STYLE_MINOR,
            STYLE_TEXT})
    @Retention(RetentionPolicy.SOURCE)
    @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
    @interface StyleInt {
    }

    @IntDef({SIZE_LARGE,
            SIZE_MEDIUM,
            SIZE_SMALL})
    @Retention(RetentionPolicy.SOURCE)
    @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
    @interface SizeInt {
    }

    @IntDef({STATUS_NORMAL,
            STATUS_DISABLE,
            STATUS_DANGER,
            STATUS_LOADING})
    @Retention(RetentionPolicy.SOURCE)
    @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
    @interface StatusInt {
    }

}
